﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:CmdletHelpEditor.Controls">
	<LinearGradientBrush x:Key="NormalBlueGradientBrush" StartPoint="0,0" EndPoint="0,1">
		<LinearGradientBrush.GradientStops>
			<GradientStop Color="#DCEBFD" Offset="0" />
			<GradientStop Color="#BCD5F6" Offset="0.4" />
			<GradientStop Color="#80A8E1" Offset="1" />
		</LinearGradientBrush.GradientStops>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="TabSelected" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#FEFBEC" Offset="1" />
		<GradientStop Color="#FEDC5D" Offset="0" />
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="TabHover" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#FEFBEC" Offset="0" />
		<GradientStop Color="#FEDC5D" Offset="0.5" />
		<GradientStop Color="#FEECA8" Offset="1" />
	</LinearGradientBrush>
	<Style TargetType="{x:Type TabItem}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TabItem}">
					<Grid>
						<Border Name="Border" Background="#80A8E1" BorderBrush="Navy" BorderThickness="1,1,1,1" CornerRadius="2,2,0,0">
							<ContentPresenter x:Name="ContentSite" VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Header" Margin="12,2,12,2"/>
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsSelected" Value="True">
							<Setter TargetName="Border" Property="Background" Value="{StaticResource TabSelected}"/>
						</Trigger>
						<Trigger Property="IsSelected" Value="False">
							<Setter TargetName="Border" Property="Background" Value="{StaticResource NormalBlueGradientBrush}"/>
						</Trigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsMouseOver" Value="True"/>
								<Condition Property="IsSelected" Value="False"/>
							</MultiTrigger.Conditions>
							<Setter Property="Background" TargetName="Border" Value="{StaticResource TabHover}"/>
						</MultiTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style TargetType="{x:Type controls:ClosableTabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type controls:ClosableTabItem}">
					<Grid>
						<Border Name="Border" Background="#80A8E1" BorderBrush="Navy" BorderThickness="1,1,1,1" CornerRadius="2,2,0,0">
							<DockPanel>
								<ContentPresenter x:Name="ContentSite" VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Header" Margin="12,2,12,2"/>
								<Button x:Name="CloseButton" Content="x" Visibility="Hidden"/>
							</DockPanel>
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsSelected" Value="True">
							<Setter TargetName="Border" Property="Background" Value="{StaticResource TabSelected}"/>
						</Trigger>
						<Trigger Property="IsSelected" Value="False">
							<Setter TargetName="Border" Property="Background" Value="{StaticResource NormalBlueGradientBrush}"/>
						</Trigger>
						<Trigger Property="IsClosable" Value="False">
							<Setter TargetName="CloseButton" Property="Visibility" Value="Collapsed"/>
						</Trigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsMouseOver" Value="True"/>
								<Condition Property="IsSelected" Value="False"/>
							</MultiTrigger.Conditions>
							<Setter Property="Background" TargetName="Border" Value="{StaticResource TabHover}"/>
						</MultiTrigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsMouseOver" Value="True"/>
								<Condition Property="IsClosable" Value="True"/>
							</MultiTrigger.Conditions>
							<Setter Property="Visibility" TargetName="CloseButton" Value="Visible"/>
						</MultiTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>